﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 进货订单基础输入参数
/// </summary>
public class IncomingordersBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 进货单号
    /// </summary>
    public virtual string? IncomingNumber { get; set; }
    
    /// <summary>
    /// 单据状态
    /// </summary>
    public virtual string? OrdersStatus { get; set; }
    
    /// <summary>
    /// 进货日期
    /// </summary>
    public virtual DateTime? IncomingData { get; set; }
    
    /// <summary>
    /// 供应商
    /// </summary>
    public virtual long? Vendor { get; set; }
    
    /// <summary>
    /// 联系人
    /// </summary>
    public virtual string? Contact { get; set; }
    
    /// <summary>
    /// 联系方式
    /// </summary>
    public virtual string? ContactManaer { get; set; }
    
    /// <summary>
    /// 进货部门
    /// </summary>
    public virtual long? IncomingDepId { get; set; }
    
    /// <summary>
    /// 进货人
    /// </summary>
    public virtual long? IncomingPeopleId { get; set; }
    
    /// <summary>
    /// 货品数量
    /// </summary>
    public virtual int? GoodsNum { get; set; }
    
    /// <summary>
    /// 货品单价
    /// </summary>
    public virtual int? GoodsPrices { get; set; }
    
    /// <summary>
    /// 进货货品
    /// </summary>
    public virtual string? GoodsName { get; set; }
    
    /// <summary>
    /// 制单人
    /// </summary>
    public virtual long? MakeSingleId { get; set; }
    
    /// <summary>
    /// 所在部门
    /// </summary>
    public virtual long? DepId { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public virtual string? IncomingDesc { get; set; }
    
    /// <summary>
    /// 制单时间
    /// </summary>
    public virtual DateTime? MakeData { get; set; }
    
    /// <summary>
    /// 审核时间
    /// </summary>
    public virtual DateTime? AuditTime { get; set; }
    
    /// <summary>
    /// 进货明细
    /// </summary>
    public virtual string? OrganizationalStructureId { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>
    public virtual string? StorageDesc { get; set; }
    
    /// <summary>
    /// 操作人
    /// </summary>
    public virtual long? Operator { get; set; }
    
}

/// <summary>
/// 进货订单分页查询输入参数
/// </summary>
public class PageIncomingordersInput : BasePageInput
{
    /// <summary>
    /// 进货单号
    /// </summary>
    public string? IncomingNumber { get; set; }
    
    /// <summary>
    /// 单据状态
    /// </summary>
    public string? OrdersStatus { get; set; }
    
    /// <summary>
    /// 进货日期范围
    /// </summary>
     public DateTime?[] IncomingDataRange { get; set; }
    
    /// <summary>
    /// 供应商
    /// </summary>
    public long? Vendor { get; set; }
    
    /// <summary>
    /// 联系人
    /// </summary>
    public string? Contact { get; set; }
    
    /// <summary>
    /// 联系方式
    /// </summary>
    public string? ContactManaer { get; set; }
    
    /// <summary>
    /// 进货部门
    /// </summary>
    public long? IncomingDepId { get; set; }
    
    /// <summary>
    /// 进货人
    /// </summary>
    public long? IncomingPeopleId { get; set; }
    
    /// <summary>
    /// 货品数量
    /// </summary>
    public int? GoodsNum { get; set; }
    
    /// <summary>
    /// 货品单价
    /// </summary>
    public int? GoodsPrices { get; set; }
    
    /// <summary>
    /// 进货货品
    /// </summary>
    public string? GoodsName { get; set; }
    
    /// <summary>
    /// 制单人
    /// </summary>
    public long? MakeSingleId { get; set; }
    
    /// <summary>
    /// 所在部门
    /// </summary>
    public long? DepId { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public string? IncomingDesc { get; set; }
    
    /// <summary>
    /// 制单时间范围
    /// </summary>
     public DateTime?[] MakeDataRange { get; set; }
    
    /// <summary>
    /// 审核时间范围
    /// </summary>
     public DateTime?[] AuditTimeRange { get; set; }
    
    /// <summary>
    /// 进货明细
    /// </summary>
    public string? OrganizationalStructureId { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>
    public string? StorageDesc { get; set; }
    
    /// <summary>
    /// 操作人
    /// </summary>
    public long? Operator { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 进货订单增加输入参数
/// </summary>
public class AddIncomingordersInput
{
    /// <summary>
    /// 进货单号
    /// </summary>
    [MaxLength(32, ErrorMessage = "进货单号字符长度不能超过32")]
    public string? IncomingNumber { get; set; }
    
    /// <summary>
    /// 单据状态
    /// </summary>
    [MaxLength(32, ErrorMessage = "单据状态字符长度不能超过32")]
    public string? OrdersStatus { get; set; }
    
    /// <summary>
    /// 进货日期
    /// </summary>
    public DateTime? IncomingData { get; set; }
    
    /// <summary>
    /// 供应商
    /// </summary>
    public long? Vendor { get; set; }
    
    /// <summary>
    /// 联系人
    /// </summary>
    [MaxLength(32, ErrorMessage = "联系人字符长度不能超过32")]
    public string? Contact { get; set; }
    
    /// <summary>
    /// 联系方式
    /// </summary>
    [MaxLength(32, ErrorMessage = "联系方式字符长度不能超过32")]
    public string? ContactManaer { get; set; }
    
    /// <summary>
    /// 进货部门
    /// </summary>
    public long? IncomingDepId { get; set; }
    
    /// <summary>
    /// 进货人
    /// </summary>
    public long? IncomingPeopleId { get; set; }
    
    /// <summary>
    /// 货品数量
    /// </summary>
    public int? GoodsNum { get; set; }
    
    /// <summary>
    /// 货品单价
    /// </summary>
    public int? GoodsPrices { get; set; }
    
    /// <summary>
    /// 进货货品
    /// </summary>
    [MaxLength(32, ErrorMessage = "进货货品字符长度不能超过32")]
    public string? GoodsName { get; set; }
    
    /// <summary>
    /// 制单人
    /// </summary>
    public long? MakeSingleId { get; set; }
    
    /// <summary>
    /// 所在部门
    /// </summary>
    public long? DepId { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(32, ErrorMessage = "备注字符长度不能超过32")]
    public string? IncomingDesc { get; set; }
    
    /// <summary>
    /// 制单时间
    /// </summary>
    public DateTime? MakeData { get; set; }
    
    /// <summary>
    /// 审核时间
    /// </summary>
    public DateTime? AuditTime { get; set; }
    
    /// <summary>
    /// 进货明细
    /// </summary>
    [MaxLength(32, ErrorMessage = "进货明细字符长度不能超过32")]
    public string? OrganizationalStructureId { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>
    [MaxLength(32, ErrorMessage = "上传附件字符长度不能超过32")]
    public string? StorageDesc { get; set; }
    
    /// <summary>
    /// 操作人
    /// </summary>
    public long? Operator { get; set; }
    
}

/// <summary>
/// 进货订单删除输入参数
/// </summary>
public class DeleteIncomingordersInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 进货订单更新输入参数
/// </summary>
public class UpdateIncomingordersInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 进货单号
    /// </summary>    
    [MaxLength(32, ErrorMessage = "进货单号字符长度不能超过32")]
    public string? IncomingNumber { get; set; }
    
    /// <summary>
    /// 单据状态
    /// </summary>    
    [MaxLength(32, ErrorMessage = "单据状态字符长度不能超过32")]
    public string? OrdersStatus { get; set; }
    
    /// <summary>
    /// 进货日期
    /// </summary>    
    public DateTime? IncomingData { get; set; }
    
    /// <summary>
    /// 供应商
    /// </summary>    
    public long? Vendor { get; set; }
    
    /// <summary>
    /// 联系人
    /// </summary>    
    [MaxLength(32, ErrorMessage = "联系人字符长度不能超过32")]
    public string? Contact { get; set; }
    
    /// <summary>
    /// 联系方式
    /// </summary>    
    [MaxLength(32, ErrorMessage = "联系方式字符长度不能超过32")]
    public string? ContactManaer { get; set; }
    
    /// <summary>
    /// 进货部门
    /// </summary>    
    public long? IncomingDepId { get; set; }
    
    /// <summary>
    /// 进货人
    /// </summary>    
    public long? IncomingPeopleId { get; set; }
    
    /// <summary>
    /// 货品数量
    /// </summary>    
    public int? GoodsNum { get; set; }
    
    /// <summary>
    /// 货品单价
    /// </summary>    
    public int? GoodsPrices { get; set; }
    
    /// <summary>
    /// 进货货品
    /// </summary>    
    [MaxLength(32, ErrorMessage = "进货货品字符长度不能超过32")]
    public string? GoodsName { get; set; }
    
    /// <summary>
    /// 制单人
    /// </summary>    
    public long? MakeSingleId { get; set; }
    
    /// <summary>
    /// 所在部门
    /// </summary>    
    public long? DepId { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>    
    [MaxLength(32, ErrorMessage = "备注字符长度不能超过32")]
    public string? IncomingDesc { get; set; }
    
    /// <summary>
    /// 制单时间
    /// </summary>    
    public DateTime? MakeData { get; set; }
    
    /// <summary>
    /// 审核时间
    /// </summary>    
    public DateTime? AuditTime { get; set; }
    
    /// <summary>
    /// 进货明细
    /// </summary>    
    [MaxLength(32, ErrorMessage = "进货明细字符长度不能超过32")]
    public string? OrganizationalStructureId { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>    
    [MaxLength(32, ErrorMessage = "上传附件字符长度不能超过32")]
    public string? StorageDesc { get; set; }
    
    /// <summary>
    /// 操作人
    /// </summary>    
    public long? Operator { get; set; }
    
}

/// <summary>
/// 进货订单主键查询输入参数
/// </summary>
public class QueryByIdIncomingordersInput : DeleteIncomingordersInput
{
}

/// <summary>
/// 下拉数据输入参数
/// </summary>
public class DropdownDataIncomingordersInput
{
    /// <summary>
    /// 是否用于分页查询
    /// </summary>
    public bool FromPage { get; set; }
}

/// <summary>
/// 进货订单数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportIncomingordersInput : BaseImportInput
{
    /// <summary>
    /// 进货单号
    /// </summary>
    [ImporterHeader(Name = "进货单号")]
    [ExporterHeader("进货单号", Format = "", Width = 25, IsBold = true)]
    public string? IncomingNumber { get; set; }
    
    /// <summary>
    /// 单据状态
    /// </summary>
    [ImporterHeader(Name = "单据状态")]
    [ExporterHeader("单据状态", Format = "", Width = 25, IsBold = true)]
    public string? OrdersStatus { get; set; }
    
    /// <summary>
    /// 进货日期
    /// </summary>
    [ImporterHeader(Name = "进货日期")]
    [ExporterHeader("进货日期", Format = "", Width = 25, IsBold = true)]
    public DateTime? IncomingData { get; set; }
    
    /// <summary>
    /// 供应商 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? Vendor { get; set; }
    
    /// <summary>
    /// 供应商 文本
    /// </summary>
    [ImporterHeader(Name = "供应商")]
    [ExporterHeader("供应商", Format = "", Width = 25, IsBold = true)]
    public string VendorFkDisplayName { get; set; }
    
    /// <summary>
    /// 联系人
    /// </summary>
    [ImporterHeader(Name = "联系人")]
    [ExporterHeader("联系人", Format = "", Width = 25, IsBold = true)]
    public string? Contact { get; set; }
    
    /// <summary>
    /// 联系方式
    /// </summary>
    [ImporterHeader(Name = "联系方式")]
    [ExporterHeader("联系方式", Format = "", Width = 25, IsBold = true)]
    public string? ContactManaer { get; set; }
    
    /// <summary>
    /// 进货部门 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? IncomingDepId { get; set; }
    
    /// <summary>
    /// 进货部门 文本
    /// </summary>
    [ImporterHeader(Name = "进货部门")]
    [ExporterHeader("进货部门", Format = "", Width = 25, IsBold = true)]
    public string IncomingDepFkDisplayName { get; set; }
    
    /// <summary>
    /// 进货人 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? IncomingPeopleId { get; set; }
    
    /// <summary>
    /// 进货人 文本
    /// </summary>
    [ImporterHeader(Name = "进货人")]
    [ExporterHeader("进货人", Format = "", Width = 25, IsBold = true)]
    public string IncomingPeopleFkDisplayName { get; set; }
    
    /// <summary>
    /// 货品数量
    /// </summary>
    [ImporterHeader(Name = "货品数量")]
    [ExporterHeader("货品数量", Format = "", Width = 25, IsBold = true)]
    public int? GoodsNum { get; set; }
    
    /// <summary>
    /// 货品单价
    /// </summary>
    [ImporterHeader(Name = "货品单价")]
    [ExporterHeader("货品单价", Format = "", Width = 25, IsBold = true)]
    public int? GoodsPrices { get; set; }
    
    /// <summary>
    /// 进货货品
    /// </summary>
    [ImporterHeader(Name = "进货货品")]
    [ExporterHeader("进货货品", Format = "", Width = 25, IsBold = true)]
    public string? GoodsName { get; set; }
    
    /// <summary>
    /// 制单人 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? MakeSingleId { get; set; }
    
    /// <summary>
    /// 制单人 文本
    /// </summary>
    [ImporterHeader(Name = "制单人")]
    [ExporterHeader("制单人", Format = "", Width = 25, IsBold = true)]
    public string MakeSingleFkDisplayName { get; set; }
    
    /// <summary>
    /// 所在部门 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? DepId { get; set; }
    
    /// <summary>
    /// 所在部门 文本
    /// </summary>
    [ImporterHeader(Name = "所在部门")]
    [ExporterHeader("所在部门", Format = "", Width = 25, IsBold = true)]
    public string DepFkDisplayName { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [ImporterHeader(Name = "备注")]
    [ExporterHeader("备注", Format = "", Width = 25, IsBold = true)]
    public string? IncomingDesc { get; set; }
    
    /// <summary>
    /// 制单时间
    /// </summary>
    [ImporterHeader(Name = "制单时间")]
    [ExporterHeader("制单时间", Format = "", Width = 25, IsBold = true)]
    public DateTime? MakeData { get; set; }
    
    /// <summary>
    /// 审核时间
    /// </summary>
    [ImporterHeader(Name = "审核时间")]
    [ExporterHeader("审核时间", Format = "", Width = 25, IsBold = true)]
    public DateTime? AuditTime { get; set; }
    
    /// <summary>
    /// 进货明细
    /// </summary>
    [ImporterHeader(Name = "进货明细")]
    [ExporterHeader("进货明细", Format = "", Width = 25, IsBold = true)]
    public string? OrganizationalStructureId { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>
    [ImporterHeader(Name = "上传附件")]
    [ExporterHeader("上传附件", Format = "", Width = 25, IsBold = true)]
    public string? StorageDesc { get; set; }
    
    /// <summary>
    /// 操作人 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? Operator { get; set; }
    
    /// <summary>
    /// 操作人 文本
    /// </summary>
    [ImporterHeader(Name = "操作人")]
    [ExporterHeader("操作人", Format = "", Width = 25, IsBold = true)]
    public string OperatorFkDisplayName { get; set; }
    
}
